//
//  AppDelegate.m
//  ImageSender
//
//  Created by wenpd on 2021/4/9.
//

#import "AppDelegate.h"
#import <DJILogin_Category/CTMediator+DJILogin.h>
#import <DJIVideo_Category/CTMediator+DJIVideo.h>
#import <DJILogin_Category/CTMediator+DroneManager.h>
#import <QBUtility/ZQLogToolManager.h>

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    
    //Initial logtool
    [[ZQLogToolManager shareManager] logIntial];
    [ZQLogToolManager shareManager].logLevel = ZQLogToolManagerLevelText;
    
    //DJI SDK register
    [[CTMediator sharedInstance]DJIDroneManager_init];
    
    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    CTMediator* mediator = [CTMediator sharedInstance];
    UIViewController* mainPage = [mediator DJIVideo_getViewControler];
    UIViewController* logoPage = [mediator DJILogin_getLaunchScreen:mainPage];
    UINavigationController* naviController = [[UINavigationController alloc]initWithRootViewController:logoPage];
    [self.window setRootViewController:naviController];
    [self.window makeKeyAndVisible];
    
    [ZQLogToolManager shareManager].rootViewController = self.window.rootViewController;
    
    return YES;
}



@end
